package com.aco.party.enums;

/**
 * Created by WangShijun on 2016/3/19.
 */
public enum DataBaseEnum {
    显示(1,"有效"),
    隐藏(0,"无效"),
    NULL(-1,"");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    DataBaseEnum(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static DataBaseEnum getDataBaseEnum(int value){
        for (DataBaseEnum type : DataBaseEnum.values()) {
            if(type.value == value)
                return type;
        }
        return NULL;
    }
}
